3.1.80 \(\int \frac {\csc (c+d x)}{(a+a \sec (c+d x))^2} \, dx\) [80]

Optimal. Leaf size=60 \[ -\frac {\tanh ^{-1}(\cos (c+d x))}{4 a^2 d}+\frac {1}{4 d (a+a \cos (c+d x))^2}-\frac {3}{4 d \left (a^2+a^2 \cos (c+d x)\right )} \]

[Out]

-1/4*arctanh(cos(d*x+c))/a^2/d+1/4/d/(a+a*cos(d*x+c))^2-3/4/d/(a^2+a^2*cos(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {3957, 2915, 12, 90, 212} \begin {gather*} -\frac {3}{4 d \left (a^2 \cos (c+d x)+a^2\right )}-\frac {\tanh ^{-1}(\cos (c+d x))}{4 a^2 d}+\frac {1}{4 d (a \cos (c+d x)+a)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]/(a + a*Sec[c + d*x])^2,x]

[Out]

-1/4*ArcTanh[Cos[c + d*x]]/(a^2*d) + 1/(4*d*(a + a*Cos[c + d*x])^2) - 3/(4*d*(a^2 + a^2*Cos[c + d*x]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 90

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 2915

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d/b)*x
)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2,
 0]

Rule 3957

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.), x_Symbol] :> Int[(g*Co
s[e + f*x])^p*((b + a*Sin[e + f*x])^m/Sin[e + f*x]^m), x] /; FreeQ[{a, b, e, f, g, p}, x] && IntegerQ[m]

Rubi steps

\begin {align*} \int \frac {\csc (c+d x)}{(a+a \sec (c+d x))^2} \, dx &=\int \frac {\cos (c+d x) \cot (c+d x)}{(-a-a \cos (c+d x))^2} \, dx\\ &=\frac {a \text {Subst}\left (\int \frac {x^2}{a^2 (-a-x) (-a+x)^3} \, dx,x,-a \cos (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \frac {x^2}{(-a-x) (-a+x)^3} \, dx,x,-a \cos (c+d x)\right )}{a d}\\ &=\frac {\text {Subst}\left (\int \left (\frac {a}{2 (a-x)^3}-\frac {3}{4 (a-x)^2}+\frac {1}{4 \left (a^2-x^2\right )}\right ) \, dx,x,-a \cos (c+d x)\right )}{a d}\\ &=\frac {1}{4 d (a+a \cos (c+d x))^2}-\frac {3}{4 d \left (a^2+a^2 \cos (c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{a^2-x^2} \, dx,x,-a \cos (c+d x)\right )}{4 a d}\\ &=-\frac {\tanh ^{-1}(\cos (c+d x))}{4 a^2 d}+\frac {1}{4 d (a+a \cos (c+d x))^2}-\frac {3}{4 d \left (a^2+a^2 \cos (c+d x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.12, size = 83, normalized size = 1.38 \begin {gather*} -\frac {\left (-1+6 \cos ^2\left (\frac {1}{2} (c+d x)\right )+4 \cos ^4\left (\frac {1}{2} (c+d x)\right ) \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )\right ) \sec ^2(c+d x)}{4 a^2 d (1+\sec (c+d x))^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]/(a + a*Sec[c + d*x])^2,x]

[Out]

-1/4*((-1 + 6*Cos[(c + d*x)/2]^2 + 4*Cos[(c + d*x)/2]^4*(Log[Cos[(c + d*x)/2]] - Log[Sin[(c + d*x)/2]]))*Sec[c
 + d*x]^2)/(a^2*d*(1 + Sec[c + d*x])^2)

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 55, normalized size = 0.92

method result size
derivativedivides \(\frac {\frac {\ln \left (-1+\cos \left (d x +c \right )\right )}{8}+\frac {1}{4 \left (1+\cos \left (d x +c \right )\right )^{2}}-\frac {3}{4 \left (1+\cos \left (d x +c \right )\right )}-\frac {\ln \left (1+\cos \left (d x +c \right )\right )}{8}}{d \,a^{2}}\) \(55\)
default \(\frac {\frac {\ln \left (-1+\cos \left (d x +c \right )\right )}{8}+\frac {1}{4 \left (1+\cos \left (d x +c \right )\right )^{2}}-\frac {3}{4 \left (1+\cos \left (d x +c \right )\right )}-\frac {\ln \left (1+\cos \left (d x +c \right )\right )}{8}}{d \,a^{2}}\) \(55\)
norman \(\frac {-\frac {\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}{4 a d}+\frac {\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )}{16 a d}}{a}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a^{2} d}\) \(63\)
risch \(-\frac {3 \,{\mathrm e}^{3 i \left (d x +c \right )}+4 \,{\mathrm e}^{2 i \left (d x +c \right )}+3 \,{\mathrm e}^{i \left (d x +c \right )}}{2 a^{2} d \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{4}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{4 a^{2} d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{4 a^{2} d}\) \(97\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)/(a+a*sec(d*x+c))^2,x,method=_RETURNVERBOSE)

[Out]

1/d/a^2*(1/8*ln(-1+cos(d*x+c))+1/4/(1+cos(d*x+c))^2-3/4/(1+cos(d*x+c))-1/8*ln(1+cos(d*x+c)))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 74, normalized size = 1.23 \begin {gather*} -\frac {\frac {2 \, {\left (3 \, \cos \left (d x + c\right ) + 2\right )}}{a^{2} \cos \left (d x + c\right )^{2} + 2 \, a^{2} \cos \left (d x + c\right ) + a^{2}} + \frac {\log \left (\cos \left (d x + c\right ) + 1\right )}{a^{2}} - \frac {\log \left (\cos \left (d x + c\right ) - 1\right )}{a^{2}}}{8 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a+a*sec(d*x+c))^2,x, algorithm="maxima")

[Out]

-1/8*(2*(3*cos(d*x + c) + 2)/(a^2*cos(d*x + c)^2 + 2*a^2*cos(d*x + c) + a^2) + log(cos(d*x + c) + 1)/a^2 - log
(cos(d*x + c) - 1)/a^2)/d

________________________________________________________________________________________

Fricas [A]
time = 2.87, size = 106, normalized size = 1.77 \begin {gather*} -\frac {{\left (\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 6 \, \cos \left (d x + c\right ) + 4}{8 \, {\left (a^{2} d \cos \left (d x + c\right )^{2} + 2 \, a^{2} d \cos \left (d x + c\right ) + a^{2} d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a+a*sec(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/8*((cos(d*x + c)^2 + 2*cos(d*x + c) + 1)*log(1/2*cos(d*x + c) + 1/2) - (cos(d*x + c)^2 + 2*cos(d*x + c) + 1
)*log(-1/2*cos(d*x + c) + 1/2) + 6*cos(d*x + c) + 4)/(a^2*d*cos(d*x + c)^2 + 2*a^2*d*cos(d*x + c) + a^2*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\csc {\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx}{a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a+a*sec(d*x+c))**2,x)

[Out]

Integral(csc(c + d*x)/(sec(c + d*x)**2 + 2*sec(c + d*x) + 1), x)/a**2

________________________________________________________________________________________

Giac [A]
time = 0.46, size = 87, normalized size = 1.45 \begin {gather*} \frac {\frac {2 \, \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a^{2}} + \frac {\frac {4 \, a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {a^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}{a^{4}}}{16 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a+a*sec(d*x+c))^2,x, algorithm="giac")

[Out]

1/16*(2*log(abs(-cos(d*x + c) + 1)/abs(cos(d*x + c) + 1))/a^2 + (4*a^2*(cos(d*x + c) - 1)/(cos(d*x + c) + 1) +
 a^2*(cos(d*x + c) - 1)^2/(cos(d*x + c) + 1)^2)/a^4)/d

________________________________________________________________________________________

Mupad [B]
time = 0.10, size = 60, normalized size = 1.00 \begin {gather*} -\frac {\frac {3\,\cos \left (c+d\,x\right )}{4}+\frac {1}{2}}{d\,\left (a^2\,{\cos \left (c+d\,x\right )}^2+2\,a^2\,\cos \left (c+d\,x\right )+a^2\right )}-\frac {\mathrm {atanh}\left (\cos \left (c+d\,x\right )\right )}{4\,a^2\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(sin(c + d*x)*(a + a/cos(c + d*x))^2),x)

[Out]

- ((3*cos(c + d*x))/4 + 1/2)/(d*(2*a^2*cos(c + d*x) + a^2 + a^2*cos(c + d*x)^2)) - atanh(cos(c + d*x))/(4*a^2*
d)

________________________________________________________________________________________